#ifndef SH_TIME_TIMESTAMP_HPP
#define SH_TIME_TIMESTAMP_HPP

#include <chrono>

namespace sh {

namespace timestamp {
template<typename Duration = std::chrono::milliseconds>
inline int64_t steady() {
	using namespace std::chrono;
	return time_point_cast<Duration>(steady_clock::now()).time_since_epoch().count();
}

template<typename Duration = std::chrono::milliseconds>
inline int64_t system() {
	using namespace std::chrono;
	return time_point_cast<Duration>(system_clock::now()).time_since_epoch().count();
}

template<typename Duration = std::chrono::milliseconds>
inline int64_t highResolution() {
	using namespace std::chrono;
	return time_point_cast<Duration>(steady_clock::now()).time_since_epoch().count();
}



// using
inline auto steady_ms() { return steady<std::chrono::milliseconds>(); }
inline auto steady_s() { return steady<std::chrono::seconds>(); }

inline auto system_ms() { return system<std::chrono::milliseconds>(); }
inline auto system_s() { return system<std::chrono::seconds>(); }

inline auto highResolution_ms() { return highResolution<std::chrono::milliseconds>(); }
inline auto highResolution_s() { return highResolution<std::chrono::seconds>(); }




} // ns timestamp

} // ns sh


#endif // SH_TIME_ELAPSEDTIMER_HPP